﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using MySql.Data.MySqlClient;
using IPTV.DBUtility;
using IPTV.module;
using System.Data;

/// <summary>
/// Summary description for PlateDao
/// </summary>
namespace IPTV.dao
{
    public class DictionaryDao
    {
        public DictionaryDao()
        {
            
        }

        public string  findTags(string tagIds)
        {

            string sql = " SELECT d. dicname  "
                        + " FROM me_s_dictionary d  "
                        + " WHERE d.diccode in ( " + tagIds  + " ) ORDER BY displayorder desc ";

            string tags = "";
            try
            {
                MySqlDataReader reader = MySQLHelper.ExecuteReader(MySQLHelper.CONNECTION_STRING, sql, null);

                while (reader.Read())
                {
                   string tag =reader[0].ToString();
                   tags += (tag.Trim() + "、 ");
                }
                tags = tags.Substring(0, tags.Length - 2);
            }
            catch (Exception e)
            {
                Console.WriteLine("findPlatByGradeSubjectKind run error.");
            }

            return tags;
        }
    }
}